package com.example.entity;

import com.example.R;

import java.util.ArrayList;
import java.util.List;

public class Planet {
    private Integer icon;
    private String title;
    private String content;

    private static int[] icons = {
            R.drawable.qqq,R.drawable.qqq,R.drawable.qqq,R.drawable.qqq,
            R.drawable.qqq,R.drawable.qqq,R.drawable.qqq,R.drawable.qqq,
            R.drawable.qqq,R.drawable.qqq,R.drawable.qqq,R.drawable.qqq,
            R.drawable.qqq,R.drawable.qqq,R.drawable.qqq,R.drawable.qqq,
            R.drawable.qqq,R.drawable.qqq,R.drawable.qqq,R.drawable.qqq,
    };
    private static String[] titles = {
            "1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20"
    };
    private static String[] contents = {
            "1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20"
    };

    public Planet() {
    }

    public Planet(Integer icon, String title, String content) {
        this.icon = icon;
        this.title = title;
        this.content = content;
    }

    public static List<Planet> getPlanets() {
        List<Planet> planets = new ArrayList<>();
        for (int i = 0; i < icons.length; i++) {
            planets.add(new Planet(icons[i], titles[i], contents[i]));
        }
        return planets;
    }

    /**
     * 获取
     * @return icons
     */
    public static int[] getIcons() {
        return icons;
    }

    /**
     * 设置
     * @param icons
     */
    public static void setIcons(int[] icons) {
        Planet.icons = icons;
    }

    /**
     * 获取
     * @return titles
     */
    public static String[] getTitles() {
        return titles;
    }

    /**
     * 设置
     * @param titles
     */
    public static void setTitles(String[] titles) {
        Planet.titles = titles;
    }

    /**
     * 获取
     * @return contents
     */
    public static String[] getContents() {
        return contents;
    }

    /**
     * 设置
     * @param contents
     */
    public static void setContents(String[] contents) {
        Planet.contents = contents;
    }


    /**
     * 获取
     * @return icon
     */
    public Integer getIcon() {
        return icon;
    }

    /**
     * 设置
     * @param icon
     */
    public void setIcon(Integer icon) {
        this.icon = icon;
    }

    /**
     * 获取
     * @return title
     */
    public String getTitle() {
        return title;
    }

    /**
     * 设置
     * @param title
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * 获取
     * @return content
     */
    public String getContent() {
        return content;
    }

    /**
     * 设置
     * @param content
     */
    public void setContent(String content) {
        this.content = content;
    }

    public String toString() {
        return "Planet{icon = " + icon + ", title = " + title + ", content = " + content + ", icons = " + icons + ", titles = " + titles + ", contents = " + contents + "}";
    }
}
